Conventionally, technology has been proposed for extracting disparity information from a pair of images, such as stereo images, of an object photographed from different locations, and for reconstructing 3D information on the object using the extracted disparity information. During processing to extract disparity information from a pair of images, a method called block matching is often used.
Block matching is a method for calculating the disparity of a target pixel. Given a target block composed of the target pixel and neighboring pixels in one image in a pair of images, this method searches for a corresponding block with similar pixel values in the other image and calculates the disparity of the target pixel to be the disparity between the target block and the corresponding block. In this context, for grayscale images, a pixel value indicates the brightness, and for color images, the pixel value indicates the brightness/color difference or is a value based on a color system such as RGB.
In stereo images, a region may exist in which pixel values greatly differ between the images, such as a region that is concealed by an object in the foreground of one image but appears in the other image. Block matching is processing to search for corresponding blocks using similarity between pixel values, thus making it difficult to search for the corresponding block if a region in which pixel values greatly differ between the images is included in the target block.
Patent Literature 1 proposes technology for solving this problem. In Patent Literature 1, edges are extracted from an image, and the target block is divided along the extracted edges, thereby excluding, from the target block, regions in which pixel values greatly differ. In a region in which pixel values greatly differ between a pair of images, pixel values often differ greatly from other regions within the same image as well. Extracting, from a block, a region in which pixel values greatly differ therefore results in extraction, from the block, of a region in which pixel values greatly differ between images.